import * as vscode from 'vscode';
import { Context } from "./Context";
import { Entity } from "./Entity";
import { Source } from './Source';

export class ContextEntity {
    entity: Entity;
    ctx: Context;

    constructor(entity: Entity, ctx: Context) {
        this.entity = entity;
        this.ctx = ctx;
    }

    get name(): string {
        return this.entity.name;
    }

    get rng(): vscode.Range {
        return this.entity.rng;
    }

    get root_rng(): vscode.Range {
        return this.entity.root_rng;
    }

    to_string(): string {
        return this.entity.to_string();
    }

    get_source(): Source {
        return this.entity.source as Source;
    }

}